using Newtonsoft.Json;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace ST.Buz.Base.Entity
{
	/// <summary>
	/// 应收款
	/// </summary>
	[Serializable]
	[Table("IMS_FinanceRecvDue")]
	public partial class IMS_FinanceRecvDue
	{
		/// <summary>
		/// 
		/// </summary>
		[Key]
		[Column("ID")]
		public int ID { get; set; }

		/// <summary>
		/// 流水号
		/// </summary>
		[Column("SNo")]
		[StringLength(32, ErrorMessage = "{0}长度不能超过{1}")]
		public string SNo { get; set; }

		/// <summary>
		/// 期次
		/// </summary>
		[Column("Stage")]
		[StringLength(20, ErrorMessage = "{0}长度不能超过{1}")]
		public string Stage { get; set; }

		/// <summary>
		/// 应收款日期
		/// </summary>
		[Column("DueDate")]
		public DateTime? DueDate { get; set; }

		/// <summary>
		/// 应付款业务类型（采购款、销售退款）
		/// </summary>
		[Column("BuzType")]
		public int BuzType { get; set; }

		/// <summary>
		/// 业务单据ID
		/// </summary>
		[Column("BuzID")]
		public int BuzID { get; set; }

		/// <summary>
		/// 业务单据流水号
		/// </summary>
		[Column("BuzSNo")]
		[StringLength(32, ErrorMessage = "{0}长度不能超过{1}")]
		public string BuzSNo { get; set; }

		/// <summary>
		/// 布行ID
		/// </summary>
		[Column("PartnerID")]
		public int PartnerID { get; set; }

		/// <summary>
		/// 布行名
		/// </summary>
		[Column("PartnerName")]
		[StringLength(120, ErrorMessage = "{0}长度不能超过{1}")]
		public string PartnerName { get; set; }

		/// <summary>
		/// 应收款总额
		/// </summary>
		[Column("TotalRecvDue")]
		public decimal TotalRecvDue { get; set; }

		/// <summary>
		/// 已收款总额
		/// </summary>
		[Column("TotalRecved")]
		public decimal TotalRecved { get; set; }

		/// <summary>
		/// 是否开发票
		/// </summary>
		[Column("Invoice")]
		public bool Invoice { get; set; }

		/// <summary>
		/// 备注
		/// </summary>
		[Column("Comment")]
		[StringLength(100, ErrorMessage = "{0}长度不能超过{1}")]
		public string Comment { get; set; }

		/// <summary>
		/// 状态
		/// </summary>
		[Column("StateNow")]
		public int StateNow { get; set; }

		/// <summary>
		/// 收款状态（未收、部分已收、已收）
		/// </summary>
		[Column("RecvState")]
		public int RecvState { get; set; }

		/// <summary>
		/// 创建时间
		/// </summary>
		[Column("AddDate")]
		public DateTime AddDate { get; set; }

		/// <summary>
		/// 创建人ID
		/// </summary>
		[Column("AddManID")]
		[JsonIgnore]
		public int AddManID { get; set; }

		/// <summary>
		/// 创建人
		/// </summary>
		[Column("AddManName")]
		[StringLength(20, ErrorMessage = "{0}长度不能超过{1}")]
		public string AddManName { get; set; }

		/// <summary>
		/// OrgID
		/// </summary>
		[JsonIgnore]
		[Column("OrgID")]
		public int OrgID { get; set; }
	}
}

